package com.lanou3g.ptp.student.service;

import com.github.pagehelper.PageInfo;
import com.lanou3g.ptp.entity.Student;

import java.util.List;

public interface StudentService {
    /*
    finaAll 查询所有学生
    page size 分页
     */
    //List<Student> findAll(Integer page, Integer size);
    PageInfo<Student> findAll(Integer page, Integer size);

    List<Student> findAll();

    //根据id查询
    Student studentById(Long id);

    //根据名字模糊查询
    PageInfo<Student> ByName(Integer page, Integer size,String name);

    //根据id 删除学生
    int  deleteById(Long id);

    //根据id 删除多个学生
    int  deleteByIds(List<Long> id);

    //修改学生信息
    int upStuById(Long id,Student student) throws Exception;

    //添加信息
    int insetStudent(Student student) ;

    // 解析导出学生
    boolean excelToStudentInfo(byte[] bytes);

    //导入表格数据
    boolean studentExcel(List<Student> students);
    //导出学生模板
    byte[] excelStudentModel();

    Long findClazzId(long clazzId);

}
